\pdfoutput=1

\documentclass{l4proj}

\usepackage{float}

\usepackage{natbib}
\bibliographystyle{plainnat}

\usepackage[usenames,dvipsnames]{color}
\definecolor{blue}{rgb}{0,0,1}
\definecolor{darkgreen}{rgb}{0,0.5,0}
\definecolor{red}{rgb}{1,0,0}

\usepackage{hyperref}
\hypersetup{colorlinks=true,urlcolor=Violet,linkcolor=Blue,citecolor=BlueViolet}

\usepackage{float}
\floatstyle{boxed}
\restylefloat{figure}

\usepackage[nottoc]{tocbibind}

\usepackage{listings}
\lstdefinelanguage{XML}
{
  morestring=[b]",
  moredelim=[s][\bfseries\color{Maroon}]{<}{\ },
  moredelim=[s][\bfseries\color{Maroon}]{</}{>},
  moredelim=[l][\bfseries\color{Maroon}]{/>},
  moredelim=[l][\bfseries\color{Maroon}]{>},
  morecomment=[s]{<?}{?>},
  morecomment=[s]{<!--}{-->},
  commentstyle=\color{darkgreen},
  stringstyle=\color{blue},
  identifierstyle=\color{red}
}
\lstdefinelanguage{Props}
{
  moredelim=[l][\color{Blue}]{=},
  identifierstyle=\color{Maroon}
}
\lstset{breaklines=true,numbers=left,columns=flexible,tabsize=3,basicstyle=\ttfamily}

\makeatletter
\newlength{\singlespace}
\newlength{\gobble}
\newlength{\numbersep}
\newlength{\marginlength}
% The width of a single space.
\settowidth{\singlespace}{\lst@basicstyle \ }
\setlength{\singlespace}{-\singlespace}


\lst@Key{firstlineandnumber}\relax{\def\lst@firstline{#1\relax}\def\lst@firstnumber{#1\relax}}
\lst@Key{widthgobble}{0}{%
    \setlength{\gobble}{0.78\singlespace}% reindent a bit
    \setlength{\gobble}{\lst@tabsize\gobble}% multiply by tabsize
    \setlength{\gobble}{#1\gobble}% multiply by number of tabs
	\setlength{\marginlength}{\gobble}
    \addtolength{\marginlength}{20pt}%
    \def\lst@xleftmargin{\marginlength}% move left margin left
    \def\lst@framexleftmargin{\gobble}% move left frameborder left
    \setlength{\numbersep}{\gobble}%
    \addtolength{\numbersep}{10pt}%
    \def\lst@numbersep{\numbersep}% distance between numbers and left frameborder
}
\makeatother

\begin{document}
\title{Aspect-Oriented Java Application Monitoring Library}
\author{Michael Dyson}
\maketitle

\begin{abstract}
\setcounter{page}{2}
This dissertation describes the development, implementation and evaluation of an aspect-oriented library used to do real-time monitoring of the non-functional characteristics of a Java application. The library was to be usable by independent developers and corporate programmers alike. The library was developed, and fulfilled most of the requirements set.
\end{abstract}

\renewcommand{\abstractname}{Acknowledgements}
\begin{abstract}
\setcounter{page}{3}
Thank you to my supervisor, Dr Tim Storer, and project client, Chris Hutchison for all the help, support and suggestions for this project.
\end{abstract}

\educationalconsent
\setcounter{page}{4}
\tableofcontents

\input{introduction.tex}
\input{design.tex}
\input{implementation.tex}
\input{evaluation.tex}
\nocite{website:nonfunc, website:agile, website:conc, website:saop, website:spring, website:jvs, notes:psd3, book:saop}

\begin{appendices}
\chapter{Example aop.xml}
\label{app:aop}
\lstinputlisting[language=XML]{code/aop.xml}

\chapter{Example log4j.properties}
\label{app:l4j}
\lstinputlisting[language=props]{code/log4j.properties}

\chapter{Delta Calculator build.xml}
\label{app:bxml}
\lstinputlisting[language=xml]{code/build.xml}

\chapter{Delta Calculator Timer Output}
\label{app:atd}
\lstinputlisting[firstline=1,lastline=100]{logs/aspectTimerDelta.csv}

\chapter{Delta Calculator Method Touches Output}
\label{app:amd}
\lstinputlisting{logs/aspectMethodTouchesDelta.csv}

\chapter{Password Cracking By Profile Timer Output}
\label{app:pcbpt}
\lstinputlisting[firstline=1,lastline=100]{logs/aspectTimerPCBP.csv}

\chapter{Password Cracking By Profile Method Touches Output}
\label{app:pcbpm}
\lstinputlisting{logs/aspectMethodTouchesPCBP.csv}

\chapter{generation.py}
\label{app:gen}
\lstinputlisting[language=Python,keywordstyle=\color{Violet}\bfseries,identifierstyle=\color{blue},commentstyle=\color{green},stringstyle=\color{red}]{code/generation.py}
\end{appendices}
\bibliography{bib}
\end{document}
